A DBMS (Database Management System) is an important mechanism for storing and managing many types of data. A DBMS comprises at least one database server. The database server is hosted on at least one computing element (e.g. computer, server blade) and may store database data in block mode storage devices. The block mode storage devices may be one or more disk drives and flash drives connected via a high speed bus of the computing element to the one or more hardware processors (“processors”) of the computing element and/or memory of the computing element. A block mode storage device may also be a network enabled storage device that is connected via a network to the computing element and that comprises other block storage devices such as disk drives and flash drives.
More powerful DBMSs are hosted on a parallel processer hardware platform. Such DBMSs are referred to herein as multi-node DBMSs. A multi-node DBMS comprises multiple computing elements referred to herein as computing nodes. Each computing node comprises a hardware processor or multiple hardware processors that each share access to the same main memory. A multi-node DBMS may use one of several storage architectures to store database data.
One such architecture is referred to herein as the shared storage architecture. In the shared storage architecture, each computing node in a multi-node DBMS shares direct network access to one or more block storage devices that persistently store the database.
FIG. 1 is a block diagram that illustrates a shared storage multi-node DBMS. Referring to FIG. 1, shared storage multi-node DBMS 100 comprises database server instances, each hosted on a respective computing node, each database server instance providing access to the same database stored on shared storage 121. The database server instances of DBMS 100 comprise database server instances 103-1, 103-2, 103-3, and 103-4, which are hosted on computing nodes 102-1, 102-2, 102-3, and 102-4, respectively. The shared storage 121 comprises storage cells 122-1 and 122-2. Each of database server instances 103-1, 103-2, 103-3, and 103-4 is connected by a high speed network 101 to each of storage cells 122-1 and 122-2.
Each of storage cells 122-1 and 122-2 is a computing node that includes persistent storage (e.g. disk, flash memory) that store “database files” of the one or more databases of DBMS 100. Storage cell 122-1 includes persistent storage 129-1 and main memory 124-1 and storage cell 122-2 includes persistent storage 129-2 and main memory 124-2. One or more storage processes running on each of storage cells 122-1 and 122-2, such as storage process 125-1 and storage process 125-2, receive requests from any of database server instances 103-1, 103-2, 103-3, and 103-4 to read or write data blocks from or to database files stored in persistent storage. Storage cell buffer pool 128-1 and storage cell buffer pool 128-2 are buffers allocated from main memory 124-1 and 124-2, respectively. The term process, as used herein, refers to a computer system process, which is defined in the section Software Overview.
Database Server Instances
Each of the database server instances comprise database processes that run on the computing node that hosts the database server instance. A database process may be, without limitation, a process running within a database session that executes database commands issued within the database session or a query execution process belonging to a pool of processes that is assigned to execute queries issued through database sessions.
Referring to FIG. 1, each of database server instances 103-1, 103-2, 103-3, and 103-4 comprise multiple database processes and database buffers that cache data blocks read from shared storage 121. Database server instances 103-1, 103-2, 103-3, and 103-4 are hosted on computing nodes 102-1, 102-2, 102-3, and 102-4, respectively. Database server instance 103-1 comprises database processes 105-1a and 105-1b, which run on computing node 102-1, and database buffer pool 108-1, which is allocated from main memory 104-1. Database server instance 103-2 comprises database processes 105-2a and 105-2b, which run on computing node 102-2, and database buffer pool 108-2, which is allocated from main memory 104-2. Database server instance 103-3 comprises database processes 105-3a and 105-3b, which run on computing node 102-3, and database buffer pool 108-3, which is allocated from main memory 104-3. Database server instance 103-4 comprises database processes 105-4a and 105-4b, which run on computing node 102-4, and database buffer pool 108-4, which is allocated from main memory 104-4.
Data Block Read Operation in Shared Storage Architecture
Any database server instance of DBMS 100 may access a data block stored in any storage cell of shared storage 121. To read a data block, a data block read operation is initiated by any database server instance of DBMS 100. For example, database server instance 103-1 initiates a data block read operation for a data block by transmitting a data block request for the data block via network 101 to storage cell 122-1, which stores the data block in persistent storage 129-1.
Before the data block is transmitted, the data block is first added to a storage cell buffer allocated from main memory in an operation referred to herein as read staging. Read staging entails retrieving a data block from persistent storage and writing the data block to random access memory (“RAM”, e.g. non-volatile RAM memory) from where the data block is transmitted to the requester of the data block. Storage cell 122-1 retrieves the data block from persistent storage 129-1 and stores the data block in a buffer of storage cell buffer pool 128-1. From the buffer, the data block is transmitted to a buffer in database buffer pool 108-1. Similarly, database server instance 103-2 initiates a read operation for a data block by transmitting a request via network 101 to storage cell 122-1, which stores the data block in persistent storage 129-1. Storage cell 122-1 retrieves the data block from persistent storage 129-1 and stores the data block in a buffer of storage cell buffer pool 128-1. From the buffer, the data block is transmitted to a buffer in database buffer pool 108-2.
Various Advantages and Disadvantages of Shared Storage
Advantages of the shared storage architecture include, inter alia, higher availability. If any computing node and database server instance goes down, the database may remain available through the remaining computing nodes and/or database server instances. In addition, because each database server instance services and exposes the same database, clients may access that data in the database as a single database while exploiting the power of parallel processing provided by multiple computing nodes.
A disadvantage is that speed of access to the database by the multiple database service instances depends on a common network connection and processing and memory capacity of storage cells to perform read staging. Described herein are approaches for improving database access under a shared storage architecture.